package com.coolgor.coldot.dto.auth;

import java.util.List;

import com.coolgor.coldot.entity.auth.LocalUser;
import com.coolgor.coldot.enums.auth.LocalUserOperationStateEnum;

public class LocalUserExecution {
	// 结果状态
	private int state;

	// 状态标识
	private String stateInfo;

	// 执行结果的数量
	private int count;

	// 操作的对象(增删改的时候用到)
	private LocalUser localUser;

	// 获取的结果列表(查询列表的时候使用)
	private List<LocalUser> localUserList;

	public LocalUserExecution() {	}

	// 操作失败的时候使用的构造器
	public LocalUserExecution(LocalUserOperationStateEnum stateEnum) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
	}

	// 增删改 操作成功的时候使用的构造器
	public LocalUserExecution(LocalUserOperationStateEnum stateEnum, LocalUser localUser) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.localUser = localUser;
	}

	// 查询 操作成功的时候使用的构造器
	public LocalUserExecution(LocalUserOperationStateEnum stateEnum, List<LocalUser> localUserList) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.localUserList = localUserList;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public void setStateInfo(String stateInfo) {
		this.stateInfo = stateInfo;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public LocalUser getLocalUser() {
		return localUser;
	}

	public void setLocalUser(LocalUser localUser) {
		this.localUser = localUser;
	}

	public List<LocalUser> getLocalUserList() {
		return localUserList;
	}

	public void setLocalUserList(List<LocalUser> localUserList) {
		this.localUserList = localUserList;
	}

}
